package com.pingtai.util;

import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.crypto.password.StandardPasswordEncoder;





public class MyPasswordEncode implements PasswordEncoder  {

	
	 
    private static final PasswordEncoder encoder = new StandardPasswordEncoder();  
    
    public static PasswordEncoder getEncoder(){
    	return encoder;
    }
	
	@Override
	public String encode(CharSequence rawPassword) {
		return encoder.encode(rawPassword);
	}


	@Override
	public boolean matches(CharSequence rawPassword, String password) {
		// TODO Auto-generated method stub
		return encoder.matches(rawPassword, password); 
	}

}
